package easy;

public class Solution_1742 {

    public int countBalls(int lowLimit, int highLimit) {
        int[] array = new int[100001];
        for (int i = 1; i <= highLimit; i++) {
            int mod = i % 10;
            array[i] = mod + array[i / 10];
        }
        int max = 0;
        int[] counts = new int[46];
        for (int i = lowLimit; i <= highLimit; i++) {
            counts[array[i]]++;

        }
        for (int count : counts) {
            max = Math.max(max, count);
        }
        return max;
    }

    public static void main(String[] args) {
        Solution_1742 model = new Solution_1742();
        System.out.println(model.countBalls(6745, 28696));
    }
}
